using System;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.Reflection;
using Helpers.FastToString;



namespace HtmlParsing.Tegs
{
  class TegInput : TegBase
  {
    private const string ATTR_NAME_NAME = "name";
    private const string ATTR_NAME_ID = "id";
    private const string ATTR_NAME_VALUE = "value";

    public TegInput(string tegString)
      : base(tegString)
    {
    }

    public override string TegName
    {
      get { return "input"; }
    }

    protected override void Parse()
    {
      Name = GetAttributeValue(ATTR_NAME_NAME, TegString);
      Id = GetAttributeValue(ATTR_NAME_ID, TegString);
      Value = GetAttributeValue(ATTR_NAME_VALUE, TegString);
    }

    private string _name = null;
    [PrintableAttr(PublicName = "Name")]
    public string Name
    {
      get { return _name; }
      set { _name = value; }
    }

    private string _id = null;
    [PrintableAttr(PublicName = "Id")]
    public string Id
    {
      get { return _id; }
      set { _id = value; }
    }

    private string _value = null;
    [PrintableAttr(PublicName = "Value")]
    public string Value
    {
      get { return _value; }
      set { _value = value; }
    }
  }
}
